package com.study.project.controller;

import com.study.project.service.LoginService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;


@Api(tags = "WEB-登录接口")
@Controller
public class LoginController {

    @Resource
    private LoginService loginService;


    @ApiOperation(value = "登录接口")
    @GetMapping("/login")
    @ResponseBody
    public String loginByPw(String userName, String password) {

        return loginService.login(userName,password);
    }
}
